<?php
class clfile{
	//覆盖
    //writefile_cover
	public static function writeFileW1b($filename,$conntent){ 
	    $file=fopen($filename,"w+b");
	    $ret =fwrite($file,$conntent);
	    fclose($file);
	    return  $ret;
    }
	
	public static function loadFiles($aFileNames,$match='',&$arr=''){
	$aRet=array();
	$arr =array();
    foreach($aFileNames as $v){
		if($match=='' || preg_match($match,$v)){
			$arr[]=$v;
		$aRet[]=
							/*implode( "",file($v) 为一字符串　file($v为数组，　*/ 
							/*implode将字串变成数组*/
						  
						  implode( "",  array_slice( file($v) , 1 , -1 )  ) 
						   ."/********************************************/\n"   ;
		}
	}
	     
	return $aRet;
	
    }	
	
	public static function getFileNames($aFileNames,$match='',&$arr=''){
 
	$arr =array();
    foreach($aFileNames as $v){
		if($match=='' || preg_match($match,$v)){
			$arr[]=$v;
		}
	}
	     
	return $arr;
	
    }	
	
}

?>